/*******************************************************************************
 * SDP Project AUT 2012
 * 
 *                ***********Driving Assistant************
 * Team:
 * Gisela, Deidre, Brijesh, Robert
 * 
 * This class resets the output streams to write to JTextArea
 * 
 * @version 1.0
 * 
 * Copyright (c) 2011 by DrivingAssistant Team, Inc., All Rights Reserved.
 * 
 ******************************************************************************/
package com.drivingAssistant.gui;

import java.io.IOException;
import java.io.OutputStream;
import javax.swing.JTextArea;

/**
 *
 * TextAreaOutputStream class
 * 
 */
public class TextAreaOutputStream extends OutputStream {
    
    private JTextArea textControl;
    
    /**
     * 
     * @param control 
     */
    public TextAreaOutputStream(JTextArea control) {
        textControl = control;
    }

    /**
     * 
     * @param b
     * @throws IOException 
     */
    @Override
    public void write(int b) throws IOException {
        textControl.append(String.valueOf((char)b));
    }
    
}
